//
//  ProductCell.m
//  LazyCat
//
//  Created by linhui on 15/12/24.
//  Copyright (c) 2015年 zhanshu. All rights reserved.
//

#import "ProductCell.h"

@implementation ProductCell
-(void)drawRect:(CGRect)rect {
    self.chengBenTextF.layer.borderWidth = 1;
    self.chengBenTextF.layer.borderColor = SetColor(153, 153, 153, 1).CGColor;
    self.chengBenTextF.layer.cornerRadius = 3;
    self.chengBenTextF.clipsToBounds = YES;
    self.chengBenTextF.adjustsFontSizeToFitWidth = YES;
    
    self.shouJiaTextF.layer.borderWidth = 1;
    self.shouJiaTextF.layer.borderColor = SetColor(153, 153, 153, 1).CGColor;
    self.shouJiaTextF.layer.cornerRadius = 3;
    self.shouJiaTextF.clipsToBounds = YES;
    self.shouJiaTextF.adjustsFontSizeToFitWidth = YES;
    
    self.titleLabel.textColor = SetColor(51, 51, 51, 1);
    self.kuCunLabel.textColor = SetColor(151, 153, 153, 1);
    self.xiaoLiangLabel.textColor = SetColor(151, 153, 153, 1);
    self.baoCunBtn.backgroundColor = MainColor;
    [self.baoCunBtn setTitle:@"保存" forState:UIControlStateNormal];
    [self.baoCunBtn setTintColor:[UIColor whiteColor]];
    self.baoCunBtn.layer.cornerRadius = 2;
    self.baoCunBtn.clipsToBounds = YES;
    self.baoCunBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
    
    self.xiaJiaBtn.layer.borderWidth = 1;
    self.xiaJiaBtn.layer.borderColor = SetColor(0, 0, 0, 0.2).CGColor;
    self.xiaJiaBtn.layer.cornerRadius = 3;
    self.xiaJiaBtn.clipsToBounds = YES;
    
    self.shangJiaBtn.layer.borderWidth = 1;
    self.shangJiaBtn.layer.borderColor = SetColor(0, 0, 0, 0.2).CGColor;
    self.shangJiaBtn.layer.cornerRadius = 3;
    self.shangJiaBtn.clipsToBounds = YES;
    
    self.tuiJianBtn.layer.borderWidth = 1;
    self.tuiJianBtn.layer.borderColor = SetColor(0, 0, 0, 0.2).CGColor;
    self.tuiJianBtn.layer.cornerRadius = 3;
    self.tuiJianBtn.clipsToBounds = YES;
    
    self.fenXiangBtn.layer.borderWidth = 1;
    self.fenXiangBtn.layer.borderColor = SetColor(0, 0, 0, 0.2).CGColor;
    self.fenXiangBtn.layer.cornerRadius = 3;
    self.fenXiangBtn.clipsToBounds = YES;
    //
    self.bcView.frame = CGRectMake(0, 10, ScreenWidth, 169);
    self.iconImage.frame = CGRectMake(10, 10, 105, 105);
    self.titleLabel.frame = CGRectMake(123, 10, ScreenWidth - 128, 25);
    self.chengBen.frame = CGRectMake(123, 36, 33, 25);
    self.chengBenTextF.frame = CGRectMake(164, 36, 57, 25);
    self.shouJia.frame = CGRectMake(123, 65, 33, 25);
    self.shouJiaTextF.frame = CGRectMake(164, 65, 57, 25);
    self.baoCunBtn.frame = CGRectMake(ScreenWidth - 60, 65, 50, 25);
    self.kuCunLabel.font = [UIFont systemFontOfSize:14];
    CGSize size = [self.kuCunLabel.text sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:self.kuCunLabel.font,NSFontAttributeName, nil]];
    self.kunCun.frame = CGRectMake(123, 92, 33, 23);
    self.kuCunLabel.frame = CGRectMake(160, 92, size.width, 23);
    self.editImage.frame = CGRectMake(160+size.width+5, 98, 12, 12);
    self.editBtn.frame = CGRectMake(123, 90, 33+size.width+12+5, 27);
    self.xiaoLiangLabel.frame = CGRectMake(160+size.width+12 + 20, 92, 88, 23);
    self.lineView.frame = CGRectMake(10, 125, ScreenWidth - 10, 1);
    self.fenXiangBtn.frame = CGRectMake(ScreenWidth - 90, 134, 70, 24);
    self.tuiJianBtn.frame = CGRectMake(ScreenWidth - 180, 134, 70, 24);
    self.xiaJiaBtn.frame = CGRectMake(ScreenWidth - 270, 134, 70, 24);
    self.shangJiaBtn.frame = CGRectMake(ScreenWidth - 270, 134, 70, 24);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
